/**
 * com.mantisframework.core.enu
 *

 */

package com.mantisframework.core.enu;

/**
 * 
 * 
 * 
 * @author 李奎和
 * 
 *         <p>
 *         时间：2013-1-13 下午05:03:09
 *         </p>
 * 
 *         <p>
 *         电子邮件：kuiheli@163.com
 *         </p>
 */

public enum DepartmentTypeEnum {

	REGULAR("regular-department","普通部门"), BRANCH("branch-company","分公司"), SUB("subsidiaries","子公司");

	private String name;
	private String value;

	private DepartmentTypeEnum(String value,String name) {
		this.name = name;
		this.value = value;
	}

	public static String getNameByVal(String val) {
		for(DepartmentTypeEnum d : DepartmentTypeEnum.values()) {
			if(val.equals(d.getValue())) {
				return d.getName();
			}
		}
		return DepartmentTypeEnum.REGULAR.getName();
	}
	
	public void setValue(String value) {
		this.value = value;
	}

	public String getValue() {
		return value;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
}
